package list;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Vector;

public class ListTest {

    public static void main(String[] args) {
        List<Type> list = new ArrayList<>();
        list.add(new Type());
        list.add(new Type("12", "asd"));
        list.add(new Type("12", "asd"));
        list.add(new Type(null, null));
        list.add(new Type("12", "asd"));
        list.add(new Type());
        list.add(new Type("12", "asd"));

        //removeAll方法 没效果
        Collection<Type> c = new Vector<Type>();
        c.add(new Type());
        c.add(new Type(null, null));
        list.removeAll(c);
        System.out.println(list);
        list.remove(new Type());

    }
}

class Type {

    private String title;
    private String content;

    public Type() {
    }

    public Type(String title, String content) {
        this.title = title;
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String toString() {
        return "Type [title=" + title + ", content=" + content + "]";
    }

}